<HTML><HEAD><TITLE>symbol_domain_index(?X, -Domain, -Index)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(ic_symbolic)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>symbol_domain_index(?X, -Domain, -Index)</H1>
Map a symbolic domain variable/value to integer variable/value
<DL>
<DT><EM>X</EM></DT>
<DD>domain variable or value
</DD>
<DT><EM>Domain</EM></DT>
<DD>Variable, will be bound to a pair Module:DomainName
</DD>
<DT><EM>Index</EM></DT>
<DD>Variable, will be bound to integer or integer variable
</DD>
</DL>
<H2>Description</H2>

	Low-level primitive:
	For a domain variable or domain value, return the corresponding
	domain name and an integer or integer variable reflecting the
	corresponding integer index within the domain order.

<H3>Modules</H3>
This predicate is sensitive to its module context (tool predicate, see @/2).
<H3>Fail Conditions</H3>
X is neither a symbolic domain variable nor a domain constant
<H2>Examples</H2>
<PRE>
    ?- symbol_domain_index(we, D, I).
    D = eclipse:weekday
    I = 3
    Yes (0.00s cpu)

    ?- X &amp;:: weekday, X &amp;\= we, symbol_domain_index(X, D, I).
    X = X{[mo, tu, th, fr, sa, su]}
    D = eclipse:weekday
    I = I{[1, 2, 4 .. 7]}
    Yes (0.00s cpu)
    </PRE>
<H2>See Also</H2>
<A HREF="../../lib/ic_symbolic/symbols_domain_indices-3.html">symbols_domain_indices / 3</A>, <A HREF="../../lib/ic_symbolic/YNN-2.html">&:: / 2</A>, <A HREF="../../kernel/termcomp/domain-1.html">domain / 1</A>, <A HREF="../../kernel/termcomp/domain_index-3.html">domain_index / 3</A>
</BODY></HTML>
